/*
 * @project-name workflow
 * @Description: 
 * @author lenovo whr2349
 * @date 2021/7/2 16:42
 * @file whrplugin
*/

import moment from "moment";
import request from "./axios";

export default {
    install: (app, options) => {
        // app.config.globalProperties.$translate = (key) => {
        //     return key.split('.')
        //         .reduce((o, i) => { if (o) return o[i] }, options)
        // }
        //
        // app.provide('i18n', options)
        //
        // app.directive('my-directive', {
        //     mounted (el, binding, vnode, oldVnode) {
        //         // some logic ...
        //     }
        // })
        //
        // app.mixin({
        //     created() {
        //         // some logic ...
        //     }
        // })
        app.config.globalProperties.$request = request
        app.config.globalProperties.$timestampFormat = (t, str) => {
            return moment(t).format(str)
        }
    }
}